<?php
require_once "header_objects.php";
require_once "util.php";
require_once "db.php";

get_database_connection();
?>

<div class="c6"> <br/><br/> </div>

<div class="c6 box_header"> Seus objetos SCORM: </div>

<div class="c6"> <br/> </div>

<div class="c6">
  <div class="c3 thead"> Titulo </div>
  <div class="c3 thead"> Opcoes </div>
</div>

<?php
$user_id = $_COOKIE["user_id"];
$sql = "SELECT * FROM objects WHERE id IN 
        (SELECT object_id FROM objects_users WHERE user_id = $user_id)";
     
$res = mysql_query($sql);

while ($f = mysql_fetch_assoc($res)) {
?>

<div class="c6">
  <div class="c3 td">
    <?php echo $f["title"]; ?>
  </div>
  <div class="c3 td">
    <a tip="Trabalhar com esse objeto" href="index.editor.php?object_id=<?php echo $f["id"];?>"> 
      <img src="images/application--arrow.png"> </img> 
    </a>
    <a tip="Remover esse objeto" href="delete.object.php?id=<?php echo $f["id"];?>"> 
      <img src="images/shape_square_delete.png"> </img> 
    </a>    
  </div>
</div>

<?php
}
?>



<?php
require_once "footer.php";
?>
